# include <stdio.h>

int main(int argc, const char *argv[]) {
    int i = 0;
    int j = 0;
    int m = 0;
    int limit = 0;
    int sum = 0;
    for(i = 2; i < 10001; i++) {
        sum = 1;
        limit = i / 2 + 1;
        for(j = 2; j < limit; j++)  {
            //if(i % j == 0) sum = sum + j;
            if(i % j != 0) continue;
            sum = sum + j;
        }
        if(i == sum) {
            printf("完全数: %d", i);
        }
    }
    return 0;
}

